<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.14.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: TreeNode&lt; T &gt; Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.14.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search',true);
  $(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(function(){initNavTree('struct_tree_node.html','','struct_tree_node-members'); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">TreeNode&lt; T &gt; Struct Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>节点结构结构体（模板类，支持任意数据类型T）  
 <a href="#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="my__tree_8h_source.html">my_tree.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-pub-methods" class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a04c315e7d9af382fa471a9d3858e8c72" id="r_a04c315e7d9af382fa471a9d3858e8c72"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a04c315e7d9af382fa471a9d3858e8c72">TreeNode</a> (T d=T(), int p=-1, int fc=-1, int ns=-1)</td></tr>
<tr class="memdesc:a04c315e7d9af382fa471a9d3858e8c72"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造函数  <br /></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-pub-attribs" class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a4d005de6a3d939c3b379b2cba09da0d3" id="r_a4d005de6a3d939c3b379b2cba09da0d3"><td class="memItemLeft" align="right" valign="top"><a id="a4d005de6a3d939c3b379b2cba09da0d3" name="a4d005de6a3d939c3b379b2cba09da0d3"></a>
T&#160;</td><td class="memItemRight" valign="bottom"><b>data</b></td></tr>
<tr class="memitem:ab99a9346cbbbfb93e25204e75f06d090" id="r_ab99a9346cbbbfb93e25204e75f06d090"><td class="memItemLeft" align="right" valign="top"><a id="ab99a9346cbbbfb93e25204e75f06d090" name="ab99a9346cbbbfb93e25204e75f06d090"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>parent</b></td></tr>
<tr class="memitem:a592121080fa237e5085883aa59992081" id="r_a592121080fa237e5085883aa59992081"><td class="memItemLeft" align="right" valign="top"><a id="a592121080fa237e5085883aa59992081" name="a592121080fa237e5085883aa59992081"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>first_child</b></td></tr>
<tr class="memitem:a0abef096ecf053833cf5b6bb721fa420" id="r_a0abef096ecf053833cf5b6bb721fa420"><td class="memItemLeft" align="right" valign="top"><a id="a0abef096ecf053833cf5b6bb721fa420" name="a0abef096ecf053833cf5b6bb721fa420"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>next_sibling</b></td></tr>
</table>
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;typename T&gt;<br />
struct TreeNode&lt; T &gt;</div><p>节点结构结构体（模板类，支持任意数据类型T） </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">T</td><td>二叉树节点存储的数据类型 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>统一采用孩子双亲表示法这样感觉好一点 </dd></dl>
</div><a name="doc-constructors" id="doc-constructors"></a><h2 id="header-doc-constructors" class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a04c315e7d9af382fa471a9d3858e8c72" name="a04c315e7d9af382fa471a9d3858e8c72"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04c315e7d9af382fa471a9d3858e8c72">&#9670;&#160;</a></span>TreeNode()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_tree_node.html">TreeNode</a>&lt; T &gt;<a class="el" href="struct_tree_node.html">::TreeNode</a> </td>
          <td>(</td>
          <td class="paramtype">T</td>          <td class="paramname"><span class="paramname"><em>d</em></span><span class="paramdefsep"> = </span><span class="paramdefval">T()</span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>p</em></span><span class="paramdefsep"> = </span><span class="paramdefval">-1</span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>fc</em></span><span class="paramdefsep"> = </span><span class="paramdefval">-1</span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>ns</em></span><span class="paramdefsep"> = </span><span class="paramdefval">-1</span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>构造函数 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>当前节点值 </td></tr>
    <tr><td class="paramname">p</td><td>双亲索引 </td></tr>
    <tr><td class="paramname">fc</td><td>第一个孩子的索引 </td></tr>
    <tr><td class="paramname">ns</td><td>下一个兄弟的索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>统一采用孩子双亲表示法 </dd></dl>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="my__tree_8h_source.html">my_tree.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="page-nav" class="page-nav-panel">
<div id="page-nav-resize-handle"></div>
<div id="page-nav-tree">
<div id="page-nav-contents">
</div><!-- page-nav-contents -->
</div><!-- page-nav-tree -->
</div><!-- page-nav -->
</div><!-- container -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a href="struct_tree_node.html">TreeNode</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0 </li>
  </ul>
</div>
</body>
</html>
